
import Vue from 'vue'
import VueRouter from '_vue-router@3.5.2@vue-router'

import search from '../components/search'
import add from '../components/add'
import manage from '../components/manage'
import emSignUp from '../components/emSignUp'
import hrSignUp from '../components/hrSignUp'
import login from '../view/login'
import hrMain from '../components/hrMain'
import signUp from '../view/signUp'


Vue.use(VueRouter);

var routes=[
  {
    path:'/',redirect:'/login'
  },
  {
    path:'/login',component:login
  },
  {
    path :'/hrMain',component:hrMain,
    meta:{
      loginRequired:true
    },
    children:[
      {
        path:'search',component:search
      },
      {
        path:'add',component:add
      },
      {
        path:'manage',component:manage
      },

    ]
  },
  {
    path:'/signUp',component:signUp,
    children:[
      {
        path:'/',redirect:'/hrSignUp'
      },
      {
        path:'/hrSignUp',component:hrSignUp
      },
      {
        path:'/emSignUp',component:emSignUp
      }
    ]
  }

];

export default new VueRouter({
  routes:routes,
});